class Foo:

    def __del__(self):
        print("我被回收了！")


obj = Foo()

del obj